package com.xsedge.xsedge.tools;/*
 * @Author ljc
 * @Description //TODO $响应结果生成工厂类
 * @Param $
 * @return $
 **/

public class ResultFactory {
	public static Result buildSuccessResult(Object data) {
		return buidResult(ResultCode.SUCCESS, "启动成功", data);
	}

	public static Result buildFailResult(String message) {
		return buidResult(ResultCode.FAIL, message, null);
	}

	public static Result buidResult(ResultCode resultCode, String message, Object data) {
		return buidResult(resultCode.code, message, data);
	}

	public static Result buidResult(int resultCode, String message, Object data) {
		return new Result(resultCode, message, data);
	}
}